'''
Created on 30/03/2009

@author: eh01
'''
from im.ds.dsstub import DSStub
from xml.etree import ElementTree

def get_access_token():
    ds_stub = DSStub()        
    access_token = ElementTree.Element(
        '{http://test.webservice.spear.lx.dse.vic.gov.au}accessToken')
    e = ElementTree.SubElement(access_token,
        '{http://access.webservice.spear.lx.dse.vic.gov.au}accessLevel')
    e.text = 'council'
    e = ElementTree.SubElement(access_token,
        '{http://access.webservice.spear.lx.dse.vic.gov.au}hostId')
    e.text = ds_stub.get_spear_host_id()
    e = ElementTree.SubElement(access_token,
        '{http://access.webservice.spear.lx.dse.vic.gov.au}hostPassword')
    e.text = ds_stub.get_spear_host_password()
    e = ElementTree.SubElement(access_token,
        '{http://access.webservice.spear.lx.dse.vic.gov.au}remoteUser')
    e.text = 'Trent A2A (SPEAR IM)'
    return access_token